package study.java.jdk.jdk8._1_stream.terminal.short_circuiting;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.util.Arrays;
import java.util.List;

/**
 * 列表中任一元素比配我们的条件
 */
@Slf4j
public class anyMatch_01_Test {

    List<Integer> src = Arrays.asList(100, 200, 300);

    /**
     * @param predicate -Predicate:
     */
    @Test
    public void test1() {
        boolean dest = src.stream()
                .anyMatch(e -> e > 100);
        src.stream()
                .anyMatch(e -> e == 100);
        log.info("{}", dest);
    }
}
